//
//  LogicCalculator.m
//  LogicCalculator
//
//  Created by Francisco Gindre on 4/25/10.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import "LogicCalculator.h"



@implementation LogicCalculator
@synthesize p;
@synthesize q;
@synthesize r;
@synthesize sentence;

+ (Boolean)parse{
	return YES;
}

- (NSString *)sentenceToString:(NSMutableArray *)aSentence{
	NSMutableString * returnString= [NSMutableString alloc];
	[returnString initWithCapacity: [aSentence count]];
	
	for (LogicElement *element in sentence) {
		[returnString appendString:[element name]];
	}
	return returnString;
}

- (void)clearSentence :(NSMutableArray*)aSentence {
	
	[aSentence removeAllObjects];
}


- (id) init{
	
	p=[[Operand alloc]initWithName:@"p"];
	q=[[Operand alloc]initWithName:@"q"];
	r=[[Operand alloc]initWithName:@"r"];
	
	sentence=[[NSMutableArray alloc]initWithCapacity:10];	
	
	
	return self;
}

- (Boolean)isSentenceBalanced:(NSMutableArray *)aSentence{
	return NO;
}
-(NSMutableArray *)getSentence{
	return sentence;
}

@end
